package cn.git.socket;

/**
 * @description: socket工具类
 * @program: bank-credit-sy
 * @author: lixuchun
 * @create: 2024-09-27
 */
public class SocketUtil {

    /**
     * 左补0
     * eg: length = 6, num = 123, return 000123
     *
     * @param length 长度
     * @param num    数字
     * @return
     */
    public static String leftFixedZero(int length, int num) {
        return String.format("%0" + length + "d", num);
    }

}
